@extends('admin.common.list.list')
@section('content')
<div class="mws-panel grid_8">
	 <div class="mws-panel-header">
                <span><i class="icon-table"></i>商铺列表</span>
                <!-- <a  class="btn btn-success btn-xs"  style="margin-left:930px;margin-top:-50px" href="/admin/user/create">添加用户</a> -->
     </div>
    <div class="mws-panel-body no-padding">
        <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
        <form method="get" action="/admin/business">
	        <div id="DataTables_Table_1_length" class="dataTables_length">
	        	
	        	<label>显示 
	        		<select name="count" aria-controls="DataTables_Table_1">
		        		<option value="10" @if(!empty($request['count']) && $request['count'] == 10) selected @endif>10</option>
		        		<option value="20" @if(!empty($request['count']) && $request['count'] == 20) selected @endif>20</option>
		        		<option value="30" @if(!empty($request['count']) && $request['count'] == 30) selected @endif>30</option>
		        		<option value="50" @if(!empty($request['count']) && $request['count'] == 50) selected @endif>50</option>
		        	</select> 条</label>
		    </div>
		        <div class="dataTables_filter" id="DataTables_Table_1_filter">
		        	<label>关键字搜索: <input type="text" name="search" value="{{$request['search'] or ''}}" aria-controls="DataTables_Table_1"><input type="submit" class="btn btn-success btn-xs" value="搜索"></label>
		        </div>
		</form>
		        <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
		            <thead>
		            	<tr>
		            		<th>id</th>
		            		<th>商铺名称</th>
		            		<th>商铺地址</th>
		            		<th>商铺电话</th>
		            		<th>配送费</th>
		            		<th>起送价格</th>
		            		<th>营业时间</th>
		            		<th>商铺状态</th>
		            	</tr>
		            </thead>
	            
			        <tbody role="alert" aria-live="polite" aria-relevant="all">
			        		@foreach($custom as $k=>$v)
			        		<tr class="odd" align="center">
			                    <td class="">{{$v['id']}}</td>
			                    <td class="">{{$v['b_name']}}</td>
			                    <td class="">{{$v['b_address']}}</td>
			                    <td class="">{{$v['b_phone']}}</td>
			                    <td class="">{{$v['b_upPrice']}}</td>
			                    <td class="">{{$v['b_distribution']}}</td>
			                    <td class="">{{$v['b_workTime']}}</td>
			                    <td align="center"><a href="/admin/business/{{$v->id}}" class="btn {{$v->b_workStatus==1?'btn-info':'btn-warning'}}">{{$v->b_workStatus==1?'开启':'禁用'}}</a></td>
			                    
			        		@endforeach
			        </tbody>
	        </table>

			<div id="page_page">
				{!! $custom->appends($request)->render()!!}
			</div>

		</div>
    </div>
</div>
@endsection